/**
 * @type {String}
 *
 * @properties={typeid:35,uuid:"6D4ABA55-E5C5-4C8D-A10E-B550EA83A0C7"}
 */
var fTexto = null;

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"045026F5-2913-40D2-8530-FF8072E5C79F"}
 */
function buscar(event) {
	elements.tabs_330.removeAllTabs()
	/**@type {Array} */
	var $vars1 	= solutionModel.getGlobalVariables()
	var $vars = $vars1.filter(function(item) { if (item.indexOf(fTexto, 0) != -1) return true; else return false; });

	var $ds 	= databaseManager.createEmptyDataSet(0,['nombre','valor'])
	
	for (var i = 0 ; i < $vars.length ; i++)
	{
		$ds.addRow(i+1,[$vars[i],globals[$vars[i]]])
	}
	var $frm = solutionModel.getForm('globales_listado_tab')
	
	$frm.dataSource = $ds.createDataSource('GLOBALES',[JSColumn.TEXT,JSColumn.TEXT])
	forms[$frm.name].controller.recreateUI()
	
	elements.tabs_330.addTab(forms[$frm.name])
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"BF20A603-4EEA-4C62-B25C-7F1DD15D4A70"}
 */
function imprimir(event) {
	forms.globales_listado_tab.controller.showPrintPreview(false)
}
